<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-click</title>
    <style>
        #submit{
            padding: 4px 8px;
            background-color: deepskyblue;
        }
    </style>
</head>
<body>


<!--v-on: 可用 @代替-->
<!--e.preventDefault 阻止默认事件 等价于 v-on:submit.prevent -->
<div id="app">
    <form action="v-show.html" v-on:submit="submitForm">
        <button id="submit" type="submit">submit</button>
    </form>
</div>



<script src="vue/vue.js"></script>
<script>

    new Vue({
        el:"#app",
        methods:{
            submitForm:function (e) {
                alert("ddd");
                e.preventDefault();
            }
        }
    });



</script>




</body>
</html>